//添加cookie
	var setCookie = function(objName,objValue,objHours,objDomain,objPath){
	    var str = objName + "=" + escape(objValue);
	    if(objHours > 0){ //为时不设定过期时间，浏览器关闭时cookie自动消失
	        var date = new Date();
	        var ms = objHours*3600*1000;
	        date.setTime(date.getTime() + ms);
	        str += "; expires=" + date.toGMTString();
	        if(objDomain){
	            str += ";domain="+objDomain;
	        }
	        if(objPath){
	            str += ";path="+objPath;
	        }
	    }
	    document.cookie = str;
	};
	//获取指定名称的cookie的值
	var getCookie = function(objName){
		var arrStr = document.cookie.split("; ");
		for(var i = 0;i < arrStr.length;i ++){
			var temp = arrStr[i].split("=");
			if(temp[0] == objName) return unescape(temp[1]);
		}
	};
	//获取日期数据
	var getTime = function(date){
		return {
			'year':date.getFullYear(),
			'month':date.getMonth()+1,
			'day':date.getDate(),
			'hour':date.getHours(),
			'minute':date.getMinutes(),
			'second':date.getSeconds(),
			'offset':date.getTimezoneOffset()
		};
	};
	//时间格式化
	var timeFormat = function(time){
		return (time['hour']>9?time['hour']:'0'+time['hour'])+':'+(time['minute']>9?time['minute']:'0'+time['minute'])+':'+(time['second']>9?time['second']:'0'+time['second']);
	};
	var dateFormat = function(time){
		return time['year']+'-'+(time['month']>9?time['month']:'0'+time['month'])+'-'+(time['day']>9?time['day']:'0'+time['day']);
	};

	$info.innerHTML = '<p>'+date['cYear']+'-'+(date['cMonth']>9?date['cMonth']:'0'+date['cMonth'])+'-'+(date['cDay']>9?date['cDay']:'0'+date['cDay'])+' '+date['ncWeek']+'</p>\
		<div class="day">'+date['cDay']+'</div>\
		<div class="sub"><p>'+date['IMonthCn']+date['IDayCn']+'</p>\
		<p>'+date['gzYear']+'年 【'+date['Animal']+'年】</p>\
		<p>'+date['gzMonth']+'月 '+date['gzDay']+'日</p></div>\
		<div class="festival"><p>'+date['festival'].replace(/\s/g,'</p><p>')+'</p></div>';


//回到顶部
(function(){
    var $mod_goback = DOMUtil.getElementsByClassName('mod-goback')[0];
    if($mod_goback){
        var scroll = function(){
            var top = document.documentElement.scrollTop||document.body.scrollTop;
            $mod_goback.style.display = top>420?'block':'none';
        }  
        window.onscroll = scroll;
    }
})();